import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
import OpeningView from '@/views/OpeningView.vue'
import ClosingView from '@/views/ClosingView.vue'
import GuidenceView from '@/views/GuidenceView.vue'
import NameListLotteryView from '@/views/NameListLotteryView.vue'
import ScanCodeLotteryView from '@/views/ScanCodeLotteryView.vue'
import NewLotteryView from '@/views/NewLotteryView.vue'

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/opening',
    },
    {
      path: '/opening',
      name: 'opening',
      component: OpeningView,
    },
    {
      path: '/closing',
      name: 'closing',
      component: ClosingView,
    },
    {
      path: '/guidance',
      name: 'guidance',
      component: GuidenceView
    },
    {
      path: '/name-list-lottery',
      name: 'name-list-lottery',
      component: NameListLotteryView,
    },
    {
      path: '/scan-code-lottery',
      name: 'scan-code-lottery',
      component: ScanCodeLotteryView,
    },
    {
      path: '/new-lottery',
      name: 'new-lottery',
      component: NewLotteryView,
    },
  ],
})

export default router
